#ifndef DWARF__VALUE_H
#define DWARF__VALUE_H

#include <libdwarf/libdwarf.h>

namespace dwarf {

class Value {
public:
	union Data {
		Dwarf_Bool boolean_;
		Dwarf_Small uSmall_;
		Dwarf_Half uHalf_;
		Dwarf_Signed sLarge_;
		Dwarf_Unsigned uLarge_;
		Dwarf_Addr address_;
		Dwarf_Off offset_;
		char block_[];
	};
private:
	Dwarf_Half format_;
	Data data_;
public:
	Value();
	Value(Dwarf_Half _format, const Data &_data);
	Value(const Value &_value);
	~Value();
public:
	Dwarf_Half getFormat() const;
	void setFormat(Dwarf_Half _format);
	Data &getData();
	void setData(const Data &_data);
};

}

#endif // DWARF__VALUE_H
